From: Marco Trevisan (TreviƱo) Date: Thu, 7 May 2026 18:20:24 +0000 (+0200) Subject: extensionSystem: Split out the actual extension disabling X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~9^2^2~21 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=788407dc248838f22268dee431702eff7dcf5937;p=gnome-shell.git extensionSystem: Split out the actual extension disabling We will need it in an upcoming commit, and let's try to share code, even if it's not much Part-of: (cherry picked from commit 3a4bb929e34d6fbe36f84a335180d063cdf7d413) --- diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index fcff08eb4..9a34a9cbf 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -180,6 +180,14 @@ export class ExtensionManager extends Signals.EventEmitter { return false; } + _callExtensionDisable(extension) { + try { + extension.stateObj.disable(); + } catch (e) { + this.logExtensionError(extension.uuid, e); + } + } + async _callExtensionDisableWithRebase(uuid) { const extension = this.lookup(uuid); if (!extension) @@ -204,20 +212,11 @@ export class ExtensionManager extends Signals.EventEmitter { for (let i = 0; i < orderReversed.length; i++) { const otherUuid = orderReversed[i]; - try { - console.debug(`Temporarily disable extension ${otherUuid}`); - this.lookup(otherUuid).stateObj.disable(); - } catch (e) { - this.logExtensionError(otherUuid, e); - } - } - - try { - extension.stateObj.disable(); - } catch (e) { - this.logExtensionError(uuid, e); + console.debug(`Temporarily disable extension ${otherUuid}`); + this._callExtensionDisable(this.lookup(otherUuid)); } + this._callExtensionDisable(extension); this._unloadExtensionStylesheet(extension); for (let i = 0; i < order.length; i++) {